﻿@model ExamplesCommonCode.CommonAdmin.InviteUserSetup

@{
    ViewData["Title"] = "Invite User";
    Layout = "_CompanyLayout";
}

<h1>Invite User</h1>

<h5>Please add the information for the user you want to invite to your application.</h5>
<hr />

<div class="row">
    <div class="col-md-12">
        <form asp-action="InviteUser">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="form-group">
                <label name="email" class="control-label">Email of user to invite</label>
                <input name="email" type="email" class="form-control" />
            </div>
            <div class="form-group row">
                @Html.LabelFor(model => model.RoleNames, new { @class = "col-sm-2 col-form-label" })
                <div class="col-sm-10">
                    @Html.ListBoxFor(model => model.RoleNames,
                        new MultiSelectList(Model.AllRoleNames),
                        new { @class = "form-control", multiple = "multiple", id = "roleNames_dropdown" })
                </div>
            </div>
            <div class="form-group row">
                <label name="InviteExpiration" class="control-label">Invite expiration time</label>
                <div class="col-sm-10">
                    @Html.DropDownListFor(model => model.InviteExpiration,
                    new SelectList( Model.ExpirationTimesDropdown, "Key", "Value"),
                        new { @class = "form-control" })
                </div>
            </div>
            <div class="form-group">
                <input type="submit" value="Create Invite" class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

